/* SPDX-License-Identifier: GPL-2.0 */
/*
 * vim: noexpandtab sw=8 ts=8 sts=0:
 *
 * Created by:	Qiu Zhao, 2023-04-12
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 */

#ifndef DEALLOC_H
#define DEALLOC_H

#include <linux/fs.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/highmem.h>
#include <linux/swap.h>
#include <linux/quotaops.h>
#include <linux/blkdev.h>
#include <linux/sched/signal.h>
#include "cluster/masklog.h"
#include "ocfs2.h"
#include "alloc.h"
#include "aops.h"
#include "blockcheck.h"
#include "lockglue.h"
#include "extent_map.h"
#include "inode.h"
#include "journal.h"
#include "localalloc.h"
#include "suballoc.h"
#include "sysfile.h"
#include "file.h"
#include "super.h"
#include "uptodate.h"
#include "xattr.h"
#include "refcounttree.h"
#include "ocfs2_trace.h"
#include "resize.h"
#include "buffer_head_io.h"
int ocfs2_validate_truncate_rec_list(struct super_block *sb,
		struct buffer_head *bh);
int ocfs2_truncate_log_append_with_expand(struct ocfs2_super *osb, handle_t *handle,
		struct ocfs2_truncate_log *tl,
		unsigned int start_cluster,
		unsigned int num_clusters);
int ocfs2_truncate_log_append_no_expand(struct ocfs2_super *osb, handle_t *handle,
		struct ocfs2_truncate_log *tl,
		unsigned int start_cluster,
		unsigned int num_clusters);
int ocfs2_dealloc_fs_range(struct super_block *sb, u64 start, u64 len);
#endif
